<template>
    <el-dialog
            append-to-body
            :visible.sync="visible"
            title="锁定房间"
            width="450px"
            :close-on-click-modal="false"
            @submit.native.prevent
    >
        <el-form :ref="editFormRef" :model="formData" label-width="80px" :rules="rules" @submit.native.prevent>
            <el-form-item label="锁定原因" prop="sdyy">
                <el-select v-model="formData.sdyy" placeholder="请选择锁定原因" style="width: 100%;">
                    <el-option label="装修中" value="zxz"/>
                    <el-option label="无偿移交物业" value="wcyjwy"/>
                </el-select>
            </el-form-item>

            <el-form-item label="说明" prop="sdsm">
                <el-input v-model="formData.sdsm" placeholder="请输入锁定说明" type="textarea" :rows="3" resize="none"/>
            </el-form-item>
        </el-form>

        <template slot="footer">
            <el-button type="success" class="button-wide" @click="submitHandler">确定</el-button>
            <el-button type="info" class="button-wide" @click="dialogCloseHandler">取消</el-button>
        </template>
    </el-dialog>
</template>

<script>
    export default JBoot({
        props: {},

        data() {
            return {
                moduleName: 'ftgl',
                submitMethod: 'handleLock',
                rules: {
                    sdyy: [{required: true, message: '请选择锁定原因'}],
                    sdsm: [{min: 0, max: 255, message: '锁定说明最多输入255个字符'}],
                }
            };
        },

        methods: {
            isLoadDataInfo (){ return false; },

            getEditFormDataInfo (){
                return Object.assign({}, this.formData, {
                    roomId: this.parentParam.roomId
                });
            }
        }
    }).form().build();
</script>

<style lang="scss">

</style>
